Apparatus and method for analyzing people flows in image

ABSTRACT

An image processing apparatus includes: an acquisition unit that acquires movement vectors of a crowd for each area of an image; a generation unit that generates people-flow clusters based on the movement vectors acquired by the acquisition unit; a classification unit that classifies the people-flow clusters generated by the generation unit into normal people-flow clusters and abnormal people-flow clusters; and a display unit that displays, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters as superimposed on the image.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an apparatus and method for analyzing people flows in an image.

Description of the Related Art

In recent years, systems have been proposed that shoot an image of a predetermined area with an imaging apparatus and analyze the shot image, thereby analyzing people flows in the image. Analyzing the people flows enables immediate detection of, e.g., the occurrence of a people flow flowing in a direction different from the direction of usual people flows, or the occurrence of a small group moving against the flow of a large crowd. It is anticipated that utilizing such systems will prevent unexpected accidents in places such as public areas and large commercial facilities.

Japanese Patent Application Laid-Open No. 2017-68598 discloses a technique of analyzing people flows of a crowd that is so dense that people are in contact with each other, and detecting the occurrence of an abnormal movement in the crowd. The technique of Japanese Patent Application Laid-Open No. 2017-68598 involves dividing a time-series image into time-space segments, calculating a motion feature amount for each time-space segment, and classifying each time-space segment as either a normal segment or an abnormal segment.

The time-space segments, however, do not necessarily correspond to respective people constituting the crowd. This poses a problem in that, although an abnormal people-flow can be detected, information such as how many people constitute the abnormal people-flow cannot be obtained.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, an image processing apparatus includes: an acquisition unit that acquires movement vectors of a crowd for each area of an image; a generation unit that generates people-flow clusters based on the movement vectors acquired by the acquisition unit; a classification unit that classifies the people-flow clusters generated by the generation unit into normal people-flow clusters and abnormal people-flow clusters; and a display unit that displays, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters as superimposed on the image.

Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating an exemplary hardware configuration of an image processing apparatus.

FIG. 2 is a diagram illustrating an exemplary functional configuration of the image processing apparatus.

FIG. 3 is a flowchart illustrating exemplary information processing by the image processing apparatus.

FIG. 4 is a diagram illustrating a way of dividing a screen into partial images.

FIG. 5A, FIG. 5B and FIG. 5C are diagrams illustrating exemplary matching.

FIG. 6 is a diagram illustrating an exemplary function of a movement vector extraction unit.

FIG. 7 is a diagram illustrating an exemplary people density distribution and exemplary movement vectors.

FIG. 8 is a diagram illustrating an exemplary histogram divided into bins.

FIG. 9 is a diagram illustrating an exemplary histogram divided into bins.

FIG. 10 is a diagram illustrating exemplary probabilities of occurrence of people-flow clusters learned by a people-flow learning unit.

FIG. 11A, FIG. 11B and FIG. 11C are diagrams illustrating exemplary icons corresponding to people-flow clusters.

FIG. 12 is a diagram illustrating exemplary display by a display unit.

FIG. 13 is a diagram illustrating an exemplary functional configuration of an image processing apparatus.

FIG. 14 is a flowchart illustrating exemplary information processing by the image processing apparatus.

FIG. 15 is a diagram illustrating exemplary matched points in coordinate transformation.

FIG. 16 is a diagram illustrating an example of displaying normal people-flows and abnormal people-flows in a visually distinguishable manner.

FIG. 17 is a diagram illustrating an exemplary functional configuration of an image processing apparatus.

FIG. 18 is a flowchart illustrating exemplary information processing by the image processing apparatus.

DESCRIPTION OF THE EMBODIMENTS

Preferred embodiments of the present invention will now be described in detail in accordance with the accompanying drawings.

First Embodiment

FIG. 1 is a diagram illustrating an exemplary hardware configuration of an image processing apparatus 100.

As the hardware configuration, the image processing apparatus 100 includes a CPU 10, a memory 11, a network OF 12, a display 13, and an input device 14. The CPU 10 is responsible for overall control of the image processing apparatus 100. The memory 11 stores data and programs used by the CPU 10 for processing. The input device 14, which may be a mouse or buttons, inputs user operations to the image processing apparatus 100. The display 13, which may be a liquid crystal display, displays results of processing performed by the CPU 10. The network I/F 12 is an interface that connects the image processing apparatus 100 to a network. By the CPU 10 performing processing based on programs stored in the memory 11, the functional configuration of the image processing apparatus 100 in FIG. 2 (to be described below) and the process of a flowchart in FIG. 3 (to be described below) are implemented.

FIG. 2 is a diagram illustrating an exemplary functional configuration of the image processing apparatus 100.

As the functional configuration, the image processing apparatus 100 includes an image acquisition unit 201, a movement vector extraction unit 202, a people-flow extraction unit 203, a people-flow learning unit 204, an abnormal people-flow determination unit 205, and a display unit 206.

The image acquisition unit 201 acquires an input image to be subjected to people-flow analysis.

The movement vector extraction unit 202 divides the image acquired by the image acquisition unit 201 into partial images. The movement vector extraction unit 202 then performs video analysis to acquire movement vectors for each partial image. Here, a movement vector is information indicating from which position to which position the head of an individual in a crowd moved in a predetermined momentary period (e.g., ⅕ second).

The people-flow extraction unit 203 receives the movement vectors estimated for each partial image by the movement vector extraction unit 202. The people-flow extraction unit 203 then clusters the movement vectors for each partial image to divide the movement vectors into a number of clusters, thereby obtaining people-flow clusters.

The people-flow learning unit 204 collects, over a certain learning period, the people-flow clusters obtained by the people-flow extraction unit 203. The people-flow learning unit 204 then statistically obtains the probabilities of occurrence of the people-flow clusters from the collected people-flow clusters. As a result of the people-flow learning unit 204 statistically obtaining the probabilities of occurrence of the people-flow clusters, it is found that, for example, around ticket gates in a station, people-flow clusters moving in directions orthogonal to the line of ticket gates are likely to occur. Since the directions of normal people-flows may vary with day of week or time of day, the people-flow learning unit 204 may obtain the probabilities of occurrence of the people-flow clusters for each day of week or each time of day. The people-flow learning unit 204 may also constantly obtain the probabilities of occurrence of the people-flow clusters over the last predetermined period (e.g., 15 minutes).

The abnormal people-flow determination unit 205 determines whether each of the people-flow clusters provided by the people-flow learning unit 204 is normal or abnormal. Alternatively, the abnormal people-flow determination unit 205 outputs the probability of being abnormal, i.e., the degree of abnormality, for each people-flow cluster.

The display unit 206 displays the people-flow clusters obtained by the people-flow extraction unit 203 on the display 13. In doing so, the display unit 206 displays, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters determined by the abnormal people-flow determination unit 205.

FIG. 3 is a flowchart illustrating exemplary information processing by the image processing apparatus 100.

At S301, the image acquisition unit 201 acquires an input image to be subjected to people-flow analysis. The image acquisition unit 201 may acquire the image from a solid state imaging sensor such as a CMOS sensor or CCD sensor, or from a storage device such as a hard disk.

At S302, the movement vector extraction unit 202 divides the image acquired by the image acquisition unit 201 into partial images. FIG. 4 is a diagram illustrating a way of dividing a screen into partial images. FIG. 4 illustrates an example in which the movement vector extraction unit 202 divides the image so that the ratio between the size of each partial image and the size of human bodies shown in the partial image is substantially constant. The movement vector extraction unit 202 then performs video analysis to extract movement vectors for each partial image. The processing in S302 is an example of processing of acquiring movement vectors of a crowd for each area in the image. Various ways may be used to acquire the movement vectors.

A first way of acquiring the movement vectors is combination of human body detection and human body tracking.

Human body detection is processing of identifying the position of a predetermined body part in an image, such as the whole or part of the face or body, and is implemented using various known techniques of pattern recognition or machine learning. Human body tracking is processing of matching human bodies resulting from human body detection performed for each of a pair of temporally sequential image frames. The matching processing can be formulated as a matching problem in which, among human body detection results, those corresponding to the same person in respective image frames are paired. First, the movement vector extraction unit 202 defines the degrees of similarity between the human body detection results using any values, such as the position and size of a figure representing each human body and the feature amounts extracted from the image. The movement vector extraction unit 202 can then determine the matching between the human body detection results using a method of sequentially paring the human body detection results in descending order of degree of similarity, or using the total optimization method in which the human body detection results are paired to maximize the sum of overall degrees of similarity. The movement vector extraction unit 202 assigns the same ID to each pair of matched human body detection results, which is presented as a human body tracking result.

FIGS. 5A to 5C are diagrams illustrating exemplary matching. FIG. 5A is the result of performing human body detection in an image frame acquired at time t1. FIG. 5B is the result of performing human body detection in an image frame acquired at time t2 after the lapse of a predetermined momentary period (e.g., ⅕ second) from time t1. Rectangles 501, 502, 503 and 504 correspond to detected human bodies. By performing human body tracking, the rectangles 501 and 503 are assigned an ID 1, and the rectangles 502 and 504 are assigned an ID 2. Connecting the positions before and after the movement of the rectangles with the same ID yields a movement vector. In the case of FIGS. 5A to 5C, an arrow 505 connecting the center of the rectangle 501 as the start point and the center of the rectangle 503 as the end point is a movement vector. Similarly, an arrow 506 connecting the center of the rectangle 502 as the start point and the center of the rectangle 504 as the end point is a movement vector.

A second way of acquiring the movement vectors is to use an estimator that takes temporally sequential image frames of a partial image as input and estimates a crowd density distribution and movement vector distributions. As a way of estimating a people density distribution and movement vector distributions in an image, a method described in a document “Walach E., Wolf L. (2016) Learning to Count with CNN Boosting. In: Leibe B., Matas J., Sebe N., Welling M. (eds) Computer Vision—ECCV 2016. ECCV 2016. Lecture Notes in Computer Science, vol 9906. Springer, Cham” may be used, for example. In this document, a neural network obtained in advance by machine learning is used to determine a people density distribution from an image. The present embodiment applies this method; a neural network is learned in advance that takes two sequential frames of a partial-image as input to simultaneously estimate a people density distribution and movement vector distributions in the partial image, and the neural network is used for estimation. FIG. 6 is a diagram illustrating an exemplary function of the movement vector extraction unit 202. In the output from a neural network in FIG. 6, dark-colored parts in a people density distribution represent the positions of the heads of people. In movement vectors, darker-colored values represent greater amounts of movement. Since the crowd moves in the right-left direction in the example of FIG. 6, the horizontal movement vectors have greater values while the vertical movement vectors have smaller values. The density distribution is designed in such a manner that the sum of the values of the density distribution in an area substantially equals the number of people in that area.

FIG. 7 is a diagram illustrating an exemplary people density distribution and exemplary movement vectors in a partial image, estimated by an estimator. The movement vector extraction unit 202 can extract the movement vectors by synthesizing horizontal movement vectors and vertical movement vectors. The movement vectors have weights equal to the values of the density distribution. In the example of FIG. 7, seven weighted movement vectors are obtained in the partial image.

The two ways of acquiring the movement vectors have thus been described. For highly accurate extraction of the movement vectors, the first way may be used for a lightly congested crowd, and the second way may be used for a heavily congested crowd. Acquisition of the movement vectors is not limited to these ways but may employ any ways.

At S303, the people-flow extraction unit 203 receives the movement vectors estimated for each partial image by the movement vector extraction unit 202. The people-flow extraction unit 203 then clusters the movement vectors for each partial image to divide the movement vectors into a number of clusters, thereby obtaining people-flow clusters.

The movement vectors may be clustered in any way. A way involving use of a histogram will be described below. First, from movement vectors longer than a predetermined threshold among the movement vectors acquired by the movement vector extraction unit 202, the people-flow extraction unit 203 generates a histogram based on the directions of the movement vectors. Here, if the movement vectors are weighted, the people-flow extraction unit 203 takes the weights into account to count the frequencies. FIG. 8 is a diagram illustrating an exemplary histogram divided into bins of a width of 30 degrees.

Then, in this histogram, bins having a relative maximum value, i.e., bins having a frequency higher than both the frequencies of the two adjacent bins, are looked for. Here, because of the cyclicity of angles, the bin of “0 to below 30 degrees” and the bin of “330 to below 360 degrees” are regarded as adjacent. In the example of FIG. 8, the bins of “120 to below 150 degrees,” “210 to below 240 degrees” and “330 to below 360 degrees” have a relative maximum value.

Then, from the bins having a relative maximum value, the people-flow extraction unit 203 excludes insignificant bins. For example, the people-flow extraction unit 203 regards bins having a frequency below a threshold as insignificant bins and excludes these bins. If the threshold is 15, in the example of FIG. 8, the bin of “210 to below 240 degrees” is excluded to leave the other two bins. Exclusion of bins is not limited to this way. For example, the people-flow extraction unit 203 may employ a way of excluding a bin based on whether or not “the frequency of the bin divided by the sum of the frequencies of all bins” is not greater than a threshold. The bins remaining after this processing will be called relative-maximum bins. The people-flow extraction unit 203 then generates people-flow clusters corresponding to the respective relative-maximum bins. The people-flow extraction unit 203 generates a people-flow cluster from a set of movement vectors belonging to the corresponding relative-maximum bin or to bins surrounding the corresponding relative-maximum bin. There are several ways of defining the range of bins to be regarded as the surrounding bins. A first way is to define up to N bins on each side of a relative-maximum bin as the surrounding bins (N is an integer not smaller than 0). For example, in FIG. 8, if up to one bin on each side are defined as the surrounding bins, a set of movement vectors belonging to three bins labeled “A” is a first people-flow cluster, and a set of movement vectors belonging to three bins labeled “B” is a second people-flow cluster. A second way is to define, among bins around a relative maximum bin, up to bins having a frequency greater than “the frequency of the relative-maximum bin multiplied by a predetermined factor” are defined as the surrounding bins.

The people-flow extraction unit 203 then calculates, for each people-flow cluster, statistical values such as the number of constituent people, speed, and direction. The number of constituent people is obtained from the number of movement vectors constituting the people-flow cluster. The speed is determined by calculating the average or median of the magnitudes of the movement vectors constituting the people-flow cluster. The direction is also determined, as with the speed, by calculating the average or median of the directions of the movement vectors constituting the people-flow cluster. This processing yields a directed people-flow cluster. This processing of generating the directed people-flow cluster is an example of processing of generating, according to the movement vectors, a directed people-flow cluster from a crowd moving in the same direction.

For the directed people-flow clusters, the people-flow extraction unit 203 may set the maximum value per area. For example, the people-flow extraction unit 203 may output only up to two directed people-flow clusters per area. In that case, the people-flow extraction unit 203 takes people-flow clusters in descending order of number of constituent people. This processing of generating the directed people-flow cluster is also an example of processing of generating, according to the movement vectors, a directed people-flow cluster from a crowd moving in the same direction.

Clustering of the people flows is not limited to the above ways. For example, the people-flow extraction unit 203 may use known cluster analysis techniques, such as the k-means method and hierarchical techniques.

Movement vectors shorter than a predetermined threshold, i.e., movement vectors corresponding to substantially unmoving heads, are classified into a special bin called “stagnant.” If the frequency of a stagnant bin is not lower than a threshold, the people-flow extraction unit 203 also regards the stagnant bin as an independent people-flow cluster. If the threshold is 15, in the example of FIG. 8, a set of movement vectors belonging to a stagnant bin is a third people-flow cluster because the frequency of the stagnant bin is not lower than the threshold. Hereinafter, the people-flow cluster generated in this manner will be called a stagnant cluster. This processing of generating the stagnant cluster is an example of generating, according to the movement vectors, a stagnant cluster from a crowd stagnating at the same location. Now, the case where people flows are hard to be clustered will be described. If individuals in a crowd randomly move around with no tendency in the directions of movement vectors, the movement vectors appear substantially uniformly in all directions as in FIG. 9. As in this case, if the frequencies of movement vectors in all bins have a low distribution, the people-flow extraction unit 203 generates one special people-flow cluster called “random.” Hereinafter, the people-flow cluster generated in this manner will be called a random cluster. This processing of generating the random cluster is an example of generating, according to the movement vectors, a random cluster from a crowd moving in random directions.

At S304, the people-flow extraction unit 203 determines whether it is currently a learning period or not. The learning period may be a fixed period, e.g., the first one week in every month, or may be explicitly defined by a user. If it is necessary to constantly calculate the probabilities of occurrence of the people-flow clusters over the last 15 minutes, it is always the learning period. If it is determined that it is currently the learning period, the people-flow extraction unit 203 proceeds to S305; otherwise, the people-flow extraction unit 203 proceeds to S306. At S305, over the learning period, the people-flow learning unit 204 collects the people-flow clusters obtained by the people-flow extraction unit 203. The people-flow learning unit 204 then statistically obtains the probabilities of occurrence of the people-flow clusters from the collected people-flow clusters.

FIG. 10 is a diagram illustrating exemplary probabilities of occurrence of the people-flow clusters learned by the people-flow learning unit 204. In the example of FIG. 10, the people-flow learning unit 204 learns the probabilities of occurrence of the people-flow clusters for every three hours. In the example of FIG. 10, it can be seen that, between 6 a.m. and 9 a.m. on weekdays, people-flow clusters having directions of 0 to below 30 degrees occurred at a ratio of 45% in a partial image 1.

The people-flow learning unit 204 may also statistically obtain the probabilities of occurrence of the people-flow clusters over the last predetermined period. For example, the people-flow learning unit 204 may constantly calculate the probabilities of occurrence of the people-flow clusters over the last 15 minutes.

At S306, the abnormal people-flow determination unit 205 determines whether each of the people-flow clusters provided by the people-flow learning unit 204 is normal or abnormal. Based on the probabilities of occurrence of the people-flow clusters learned by the people-flow learning unit 204, the abnormal people-flow determination unit 205 determines the occurrence of a people flow with a low probability of occurrence as abnormal. In the following, the threshold for determining as abnormal is assumed to be 10%. For example, if a people-flow cluster moving in a direction of 15 degrees occurs in the partial image 1 at 8 a.m. on a weekday, this people-flow cluster is determined as normal because the probability of occurrence of this people-flow cluster is 45% according to FIG. 10. If a people-flow cluster moving in a direction of 15 degrees occurs in a partial image 2 at the same hour, this people-flow cluster is determined as abnormal because the probability of occurrence of this people-flow cluster is 5% according to FIG. 10.

Instead of the binary classification of the people-flow cluster as normal or abnormal, the abnormal people-flow determination unit 205 may output the probability that each people-flow cluster will be abnormal, i.e., the degree of abnormality. This processing is an example of abnormality degree acquisition processing in which the abnormal people-flow determination unit 205 acquires the degree of abnormality of each people-flow cluster. For example, on the occurrence of a people-flow cluster with a probability of occurrence x, the abnormal people-flow determination unit 205 may return 1−x as the degree of abnormality of this people-flow cluster.

The abnormal people-flow determination unit 205 may also determine whether a people-flow cluster in a partial image of interest are normal or abnormal without using the probabilities of occurrence of the people-flow clusters learned by the people-flow learning unit 204. For example, in an environment in which a crowd is expected to move in one direction, the abnormal people-flow determination unit 205 can determine that the occurrence of multiple directed people-flow clusters in a small area is abnormal. Alternatively, the abnormal people-flow determination unit 205 may determine whether a people-flow cluster in a partial image of interest is normal or abnormal using people-flow clusters occurring in partial images around the partial image of interest. For example, if a directed people-flow cluster occurring in a partial image of interest has a direction different from any of people-flow clusters occurring in partial images around the partial image of interest, the abnormal people-flow determination unit 205 determines the people-flow cluster as abnormal.

The abnormal people-flow determination unit 205 may also determine whether a people-flow cluster in a partial image of interest is normal or abnormal using both the probabilities of occurrence of the people-flow clusters learned by the people-flow learning unit 204 and people-flow clusters occurring in partial images around the partial image of interest.

At S307, the display unit 206 displays the people-flow clusters obtained by the people-flow extraction unit 203. FIGS. 11A to 11C are diagrams illustrating exemplary icons corresponding to people-flow clusters. An icon in FIG. 11A denotes a directed people-flow cluster. The direction of the arrow represents the direction of the people flow. The display unit 206 may further have the number of people constituting the people flow represented by the width of the arrow, and the speed of the people flow represented by the length of the arrow. The display unit 206 may display the number of people constituting the people flow as a number superimposed near the arrow. An icon in FIG. 11B denotes a stagnant cluster. The display unit 206 may have the number of people constituting the stagnant cluster and the average stagnation time represented by the radius and color of the circle. An icon in FIG. 11C denotes a random cluster. The display unit 206 may have the number of people constituting the random cluster and the degree of randomness represented by the radius and color of the icon. Correspondence between people-flow clusters and icons are not limited to these ways but may employ any ways.

The display unit 206 displays, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters determined by the abnormal people-flow determination unit 205. More specifically, the display unit 206 displays the people-flow clusters so that the normal ones and the abnormal ones are differentiated based on the color, width, transparency, color saturation, thickness of the outline, etc., of the icons. Alternatively, the display unit 206 differentiates between the normal people-flow clusters and the abnormal people-flow clusters by shading certain icons. The display unit 206 may also indicate the abnormal people-flows with text near the icons. The display unit 206 may also apply a visually distinguishable effect to the entire areas of partial images containing the occurrence of the abnormal people-flows. Here, an icon refers to an image representing a certain meaning with text or graphics.

FIG. 12 is a diagram illustrating exemplary display by the display unit 206. The display unit 206 superimposes, on each partial image, an icon corresponding to the type of a people-flow cluster obtained for the partial image. If there are multiple people-flow clusters in a partial image, the display unit 206 superimposes multiple icons on the partial image.

An icon 1201 in FIG. 12 represents a people-flow cluster moving rightward, determined as abnormal by the abnormal people-flow determination unit 205. This people-flow cluster corresponds to a people flow moving from the left toward the right on the screen to cross a people flow appearing from the back toward the front on the screen. An icon 1202 in FIG. 12 represents a stagnant cluster determined as abnormal by the abnormal people-flow determination unit 205. This stagnant cluster corresponds to stagnation occurring in a location usually having a low probability of occurrence of stagnation.

If the abnormal people-flow determination unit 205 is to output the degrees of abnormality of the people-flow clusters, the display unit 206 may display the people flows in a visually distinguishable manner according to their probabilities. For example, for higher degrees of abnormality of the people-flow clusters, the display unit 206 may display the icons with higher color saturation.

Second Embodiment

This embodiment describes the case where people flows superimposed on a map are displayed. In this embodiment, differences from the first embodiment will be described; otherwise, description will be omitted. By the CPU 10 performing processing based on programs stored in the memory 11, the functional configuration of an image processing apparatus 1300 in FIG. 13 (to be described below) and the process of a flowchart in FIG. 14 (to be described below) are implemented.

FIG. 13 is a diagram illustrating an exemplary functional configuration of the image processing apparatus 1300. The image processing apparatus 1300 in FIG. 13 has a coordinate transformation unit 1301 further added to the image processing apparatus 100 in FIG. 2. The coordinate transformation unit 1301 performs processing of transforming detected coordinates in a camera image into detected coordinates on a map.

FIG. 14 is a flowchart illustrating exemplary information processing by the image processing apparatus 1300. The flowchart in FIG. 14 has S1401 further added to the flowchart in FIG. 3.

At S1401, the coordinate transformation unit 1301 performs processing of transforming detected coordinates in a camera image into detected coordinates on a map. A way of transforming the coordinates is projective transformation based on matched points. As illustrated in FIG. 15, the coordinate transformation unit 1301 allows a user to specify arbitrary four points in the camera image and arbitrary four points on the map. This enables a projective transformation formula to be derived so that any point in the camera image can be mapped to a corresponding position on the map. When the matched points are specified, a constraint may be imposed on the order of specifying the points to avoid wrong matching. For example, the order may be constrained to be “clockwise from the upper-left point.” It is also effective that the coordinate transformation unit 1301 indicates, in numbers, the order in which the points are specified, as illustrated in FIG. 15. Given specified coordinate points and their order, the coordinate transformation unit 1301 can determine whether the coordinate points were input according to the predetermined constraint. Therefore, if the constraint is violated, the coordinate transformation unit 1301 provides setting failure notification and prompts the user to input again. If multiple cameras are provided, the coordinate transformation unit 1301 matches all cameras with the map.

As a result of the coordinate transformation unit 1301 performing the coordinate transformation processing, the movement vectors extracted at S302 can be transformed into coordinates on the map. Once the processing starting at S303 is all performed based on the coordinates on the map, the display unit 206 can display people-flow clusters superimposed on the map as in FIG. 16. In FIG. 16, icons 1601, 1602 and 1603 represent abnormal people-flow clusters, while other icons represent normal people-flow clusters.

Third Embodiment

This embodiment describes the case where notification of information about an abnormal people-flow is provided on the occurrence of the abnormal people-flow. In this embodiment, differences from the first embodiment will be described; otherwise, description will be omitted. By the CPU 10 performing processing based on programs stored in the memory 11, the functional configuration of an image processing apparatus 1700 in FIG. 17 (to be described below) and the process of a flowchart in FIG. 18 (to be described below) are implemented.

FIG. 17 is a diagram illustrating an exemplary functional configuration of the image processing apparatus 1700. FIG. 17 has the display unit 206 removed from and a notification unit 1701 and a recording unit 1702 further added to the image processing apparatus 100 in FIG. 2. The notification unit 1701 performs processing of providing notification of information about an abnormal people-flow to an external entity via the network I/F 12 when the occurrence of the abnormal people-flow is determined by the abnormal people-flow determination unit 205. The recording unit 1702 stores, in the memory 11, information about the people-flow clusters extracted by the people-flow extraction unit 203.

FIG. 18 is a flowchart illustrating exemplary information processing by the image processing apparatus 1700. FIG. 18 has S307 removed from and S1801 and S1802 further added to the flowchart in FIG. 3.

At S1801, on the occurrence of a people-flow cluster determined as abnormal by the abnormal people-flow determination unit 205, the notification unit 1701 performs processing of providing notification of information about the abnormal people-flow cluster to an external entity via the network I/F 12. The information about an abnormal people-flow cluster includes at least one of: the position on the screen or map where the abnormal people-flow cluster occurred, the number of people constituting the people-flow cluster, the moving direction of the people-flow cluster, and the moving speed of the people-flow cluster.

Providing notification on the occurrence of an abnormal people-flow enables taking actions, such as immediately notifying a security staff of the occurrence of an abnormal situation or recording and storing video at the time of occurrence of the abnormal situation.

At S1802, the recording unit 1702 stores, in the memory 11, information about the people-flow clusters extracted by the people-flow extraction unit 203. The information about each people-flow cluster includes at least one of: the position on the screen or map where the people-flow cluster occurred, the time of the occurrence of the people-flow cluster, whether the people-flow cluster is normal or abnormal (or the degree of abnormality), the number of people constituting the people-flow cluster, the moving direction of the people-flow cluster, and the moving speed of the people-flow cluster. Alternatively, the recording unit 1702 may store only information about people-flow clusters determined as abnormal by the abnormal people-flow determination unit 205. Storing the information about the people-flow clusters enables, e.g., subsequently searching the video only for scenes containing the occurrence of abnormal people-flows.

While the exemplary embodiments of the present invention have been described in detail above, the present invention is not limited to these specific embodiments.

For example, in the hardware configuration of the image processing apparatus 100, the CPU may be replaced with a GPU (Graphics Processing Unit).

Also, part or all of the functional configuration of the image processing apparatus 100 may be implemented in the hardware configuration of the image processing apparatus 100.

The above-described embodiments may also be implemented in any combination.

Other Embodiments

Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.

While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

This application claims the benefit of Japanese Patent Application No. 2017-193026, filed Oct. 2, 2017, which is hereby incorporated by reference herein in its entirety. 

What is claimed is:
 1. An image processing apparatus comprising: an acquisition unit configured to acquire movement vectors of a crowd for each area of an image; a generation unit configured to generate people-flow clusters based on the movement vectors acquired by the acquisition unit; a classification unit configured to classify the people-flow clusters generated by the generation unit into normal people-flow clusters and abnormal people-flow clusters; and a display unit configured to display, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters as superimposed on the image.
 2. The image processing apparatus according to claim 1, wherein the generation unit is configured to generate a directed people-flow cluster from a crowd moving in the same direction based on the movement vectors acquired by the acquisition unit, and the display unit is configured to display, in a visually distinguishable manner, the directed people-flow cluster as superimposed on the image.
 3. The image processing apparatus according to claim 1, wherein the generation unit is configured to generate a stagnant cluster from a crowd stagnating at the same location based on the movement vectors acquired by the acquisition unit, and the display unit is configured to display, in a visually distinguishable manner, the stagnant cluster as superimposed on the image.
 4. The image processing apparatus according to claim 1, wherein the generation unit is configured to generate a random cluster from a crowd moving in random directions based on the movement vectors acquired by the acquisition unit, and the display unit is configured to display, in a visually distinguishable manner, the random cluster as superimposed on the image.
 5. The image processing apparatus according to claim 1, wherein the generation unit is configured to acquire the number of people constituting a generated people-flow cluster, and the display unit is configured to display the number of people for the people-flow cluster.
 6. The image processing apparatus according to claim 1, wherein the generation unit is configured to acquire a speed of a generated people-flow cluster, and the display unit is configured to display the speed for the people-flow cluster.
 7. The image processing apparatus according to claim 1, wherein the generation unit is configured to acquire a direction of a generated people-flow cluster, and the display unit is configured to display the direction for the people-flow cluster.
 8. The image processing apparatus according to claim 1, wherein the classification unit is configured to classify the people-flow cluster generated by the generation unit as a normal people-flow cluster or an abnormal people-flow cluster based on the probability of occurrence of the people-flow cluster.
 9. The image processing apparatus according to claim 1, wherein the classification unit is configured to classify a people-flow cluster in a first area of the image generated by the generation unit as a normal people-flow cluster or an abnormal people-flow cluster based on the people-flow cluster in the first area and a people-flow cluster in a second area of the image around the first area generated by the generation unit.
 10. The image processing apparatus according to claim 1, wherein the acquisition unit is configured to acquire the movement vectors of the crowd by performing human body detection for each of a pair of temporally sequential image frames and performing human body tracking to match detected human bodies.
 11. The image processing apparatus according to claim 1, wherein the acquisition unit is configured to acquire the movement vectors of the crowd by using an estimator that takes an area of temporally sequential image frames as input and estimates a crowd density distribution and a movement vector distribution.
 12. The image processing apparatus according to claim 1, further comprising a transformation unit configured to map the movement vectors acquired by the acquisition unit on a map by transforming coordinates in the image into coordinates on the map, wherein the generation unit is configured to generate the people-flow clusters for each area of the map based on the movement vectors mapped on the map, and the display unit is configured to display, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters as superimposed for each area of the map.
 13. An image processing apparatus comprising: an acquisition unit configured to acquire movement vectors of a crowd for each area of an image; a generation unit configured to generate people-flow clusters based on the movement vectors acquired by the acquisition unit; an abnormality degree acquisition unit configured to acquire the degree of abnormality of each people-flow cluster generated by the generation unit; and a display unit configured to display, in a visually distinguishable manner, the degree of abnormality of the people-flow cluster as superimposed on the image.
 14. An image processing apparatus comprising: an acquisition unit configured to acquire movement vectors of a crowd for each area of an image; a generation unit configured to generate people-flow clusters based on the movement vectors acquired by the acquisition unit; a classification unit configured to classify the people-flow clusters generated by the generation unit into normal people-flow clusters and abnormal people-flow clusters; and a notification unit configured to provide notification of occurrence of an abnormal people-flow cluster in a case where a people-flow cluster generated by the generation unit is classified as an abnormal people-flow cluster by the classification unit.
 15. The image processing apparatus according to claim 14, wherein the notification unit is configured to provide notification of information about the abnormal people-flow cluster.
 16. The image processing apparatus according to claim 14, further comprising a storage unit configured to store information about the people-flow clusters generated by the generation unit.
 17. A method for image processing, comprising: acquiring movement vectors of a crowd for each area of an image; generating people-flow clusters based on the acquired movement vectors; classifying the generated people-flow clusters into normal people-flow clusters and abnormal people-flow clusters; and displaying, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters as superimposed on the image.
 18. A method for image processing, comprising: acquiring movement vectors of a crowd for each area of an image; generating people-flow clusters based on the acquired movement vectors; acquiring the degree of abnormality of each generated people-flow cluster; and displaying, in a visually distinguishable manner, the degree of abnormality of the people-flow cluster as superimposed on the image.
 19. A method for image processing, comprising: acquiring movement vectors of a crowd for each area of an image; generating people-flow clusters based on the acquired movement vectors; classifying the generated people-flow clusters into normal people-flow clusters and abnormal people-flow clusters; and providing notification of occurrence of an abnormal people-flow cluster in a case where a generated people-flow cluster is classified as an abnormal people-flow cluster.
 20. A non-transitory computer-readable recording medium having stored thereon a program for causing a computer to function, in an image processing apparatus, as: an acquisition unit configured to acquire movement vectors of a crowd for each area of an image; a generation unit configured to generate people-flow clusters based on the movement vectors acquired by the acquisition unit; a classification unit configured to classify the people-flow clusters generated by the generation unit into normal people-flow clusters and abnormal people-flow clusters; and a display unit configured to display, in a visually distinguishable manner, the normal people-flow clusters and the abnormal people-flow clusters as superimposed on the image. 